import request from '@/utils/request'
const module = '/admin/product/categoryBrand'

export const GetCategoryBrandList = (pageNum, pageSize, categoryBrand) => {
  return request.get(`${module}/list/${pageNum}/${pageSize}`, {
    params: categoryBrand,
  })
}

export const DeleteCategoryBrand = id => {
  return request.delete(`${module}/deleteCategoryBrand/${id}`)
}
export const UpdateCategoryBrand = data => {
  return request.put(`${module}/updateCategoryBrand`, data)
}

export const SaveCategoryBrand = data => {
  return request.post(`${module}/saveCategoryBrand`, data)
}

export const FindBrandByCategoryId = categoryId => {
  return request.get(`${module}/getBrandByCategoryId/${categoryId}`)
}
